Ext.define('Admin.view.orderapprove.OrderAdjustForm', {
    extend: 'Ext.form.Panel',
    alias: 'widget.order-adjust-form',
	id:'order-adjust-form',
    requires: [
        'Ext.button.Button',
        'Ext.form.field.*'
        //'Ext.form.field.File',
        //'Ext.form.field.Date',
        //'Ext.form.field.ComboBox',
        //'Ext.form.field.HtmlEditor'
    ],
    //viewModel: {type: 'order'},
    controller: 'orderapprove',
    bodyPadding: 10,
    bodyBorder: true,
	

    defaults: {
        anchor: '100%'
    },
    fieldDefaults: {
        labelAlign: 'left',
        msgTarget: 'none',
        invalidCls: '' //unset the invalidCls so individual fields do not get styled as invalid
    },

    items: [{
		xtype: 'hidden',
		fieldLabel: 'orderId',
		name:'orderId'
	},{
		xtype: 'combobox',
		fieldLabel: '部门',
		name:'departmentName',
		readOnly:'true',
		allowBlank: false,
		store:Ext.create('Admin.store.organization.OrganizationStore'),
		displayField: 'name',
		valueField:   'id'
	},{
        xtype: 'numberfield',
        name: 'dinner',
        fieldLabel: '晚餐',
		value:0,
		minValue: 0,
        allowBlank: false
    },{
        xtype: 'numberfield',
        name: 'nightSnack',
        fieldLabel: '宵夜',
		value:0,
		minValue: 0,
        allowBlank: false
    },{
        xtype: 'numberfield',
        name: 'breakfast',
        fieldLabel: '次日早餐',
		value:0,
		minValue: 0,
        allowBlank: false
    },{
        xtype: 'numberfield',
        name: 'lunch',
        fieldLabel: '次日午餐',
		value:0,
		minValue: 0,
        allowBlank: false
    },{
        xtype: 'textfield',
        name: 'userName',
        fieldLabel: '订餐人',
		readOnly:'true',
        value:userName,
        allowBlank: false
		
    },{
        xtype: 'hidden',
        name: 'createTime',
        fieldLabel: '申请时间',
		readOnly:'true',
        value:new Date()
    }
	],

   	bbar: ['->',{
		xtype: 'button',
		ui: 'soft-blue',
		text: '重新提交'	,
		handler: 'onClickAdjustFormSubmitButton'
	},{
		xtype: 'button',
		ui: 'gray',
		text: '取消',
		handler:function(btn){
			var win = btn.up('window');
	        if (win) {
	            win.close();
	        }
		}
	},'->']


});